package org.agent.service;

import java.util.List;

import org.agent.dao.user.UserMapper;
import org.agent.pojo.User;
import org.agent.service.user.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
//用注解的方式、
@Service("userService")  //id叫userService
public class UserServiceImpl implements UserService {
	@Autowired
	private UserMapper userMapper;//按类型装配
	
	

	@Override
	public List<User> getUserList(User user) {
		// TODO Auto-generated method stub
		return userMapper.getUserList(user);
	}

	@Override
	public User getUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.getUser(user);
	}

	@Override
	public int addUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.addUser(user);
	}

	@Override
	public int modifyUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.modifyUser(user);
	}

	@Override
	public int deleteUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.deleteUser(user);
	}

	@Override
	public int count(User user) {
		// TODO Auto-generated method stub
		return userMapper.count(user);
	}

	@Override
	public int isExitLoginUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.isExitLoginUser(user);
	}
	
	@Override
	public User getLoginUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.getLoginUser(user);
	}

	public UserMapper getUserMapper() {
		return userMapper;
	}

	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}

	

	

}
